feat(ledger): add paginated account listing endpoint - #110
Merged
Conversation
GET /v1/accounts returns a PageResponse<AccountResponse> ordered created_at desc then id desc. Offset pagination via Spring Pageable, size capped at 100, JWT-secured, thin controller delegating to AccountService.list which returns a domain AccountPage. Unblocks the sandbox account browser on the real API. Closes #109
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GET /v1/accountspaginated, unblocking the Sandbox UI Account Browser (Screen 1) on the real API.PageResponse<AccountResponse>= items + page/size/totalElements/totalPages.Pageable; orderedcreated_atdesc theniddesc (stable).page(>=0, default 0) andsize(1..100, default 20); out-of-range -> 400.AccountService.listreturns a domainAccountPage(no SpringPagepast the impl); thin JWT-secured controller; reuses the existingAccountResponse+ hand mapper.Tests
@WebMvcTest: list happy path (acc_ ids + page metadata), size>100 -> 400 (service not called), page<0 -> 400, unauthenticated -> 401.AccountListingIT(CI-only, Testcontainers): inserts 3 accounts with increasingcreated_at, asserts they come back newest-first across the page.Out of scope (follow-ups): filters (status/type/currency), cursor pagination, transaction listing.
Closes #109